<?php

namespace User\Form;

use Zend\Form\Form;

class FormLogin extends Form {

    public function __construct() {

        parent::__construct();

        $this->setAttribute('name', 'frmUserLogin');

        $this->setAttribute('method', 'post');

        //for user email
        $this->add(array(
            'name' => 'member_email',
            'type' => 'text',
            'attributes' => array(
                'class' => 'textbox'
            ),
            'options' => array(
                'label' => 'Email',
            )
        ));

        //for user password
        $this->add(array(
            'name' => 'member_password',
            'type' => 'password',
            'attributes' => array(
                'class' => 'textbox'
            ),
            'options' => array(
                'label' => 'Mật khẩu',
            )
        ));

        $this->add(array(
            'name' => 'remember_me',
            'type' => 'checkbox',
            'options' => array(
                'label' => 'Ghi nhớ',
                'checked_value' => 1,
                'unchecked_value' => 0
            )
        ));

        //for register button
        $this->add(array(
            'name' => 'login',
            'type' => 'submit',
            'attributes' => array(
                'value' => 'Đăng nhập',
            )
        ));
    }

}
